<h1>Adicionar oferta</h1>
<div class="row">
<?php
echo $this->Form->create('Oferta');
echo $this->Form->input('nome', array("class"=>"form-control", 'div' => array('class'=>'form-group')));
echo $this->Form->input('id_tipo_oferta', array("label" => "Tipo de Oferta", 'options' => $tipos, "class"=>"form-control", 'div' => array('class'=>'form-group')));
echo $this->Form->input('dt_inicio', array('id' => 'dt_inicio', 'label' => 'Data de início',"class"=>"form-control", 'div' => array('class'=>'form-group col-md-6')));
echo $this->Form->input('dt_fim', array('id' => 'dt_fim', 'label' => 'Data de término',"class"=>"form-control", 'div' => array('class'=>'form-group col-md-6')));
echo $this->Form->input('qtd_minima', array('type'=>'number','label' => 'Quantidade mínima', "class"=>"form-control", 'div' => array('class'=>'form-group col-md-6')));
echo $this->Form->input('vl_minimo', array('type'=>'number','label' => 'Valor mínimo', "class"=>"form-control", 'div' => array('class'=>'form-group col-md-6')));
echo $this->Form->input('vl_desconto', array('type'=>'number','label' => 'Valor desconto', "class"=>"form-control", 'div' => array('class'=>'form-group col-md-6')));
echo $this->Form->input('pct_desconto', array('type'=>'number','label' => 'Porcentagem desconto', "class"=>"form-control", 'div' => array('class'=>'form-group col-md-6')));
?>
</div>
<div class="row">
  <div class="checkbox">
    <label>
      <?php echo $this->Form->checkbox('ic_todos_produtos', array('div' => false)); ?>
      Oferta válida para todos os produtos
    </label>
  </div>
  <div class="checkbox">
    <label>
      <?php echo $this->Form->checkbox('ic_frete_gratis', array('div' => false)); ?>
      Frete Grátis
    </label>
  </div>
</div>
<?php
echo $this->Form->submit('Salvar oferta', array('class' => 'btn btn-default'));
echo $this->Form->end();
?>
<script>
  $('#dt_inicio').datepicker({
      format: "dd/mm/yyyy",
      language: "pt-BR"
  });
  $('#dt_fim').datepicker({
      format: "dd/mm/yyyy",
      language: "pt-BR"
  });
</script>
